//
//  HXDFactory.m
//  qingDaoCircleOfLife
//
//  Created by huxuedong on 15/11/21.
//  Copyright © 2015年 huxuedong. All rights reserved.
//

#import "HXDFactory.h"

@implementation HXDFactory

//工厂设计模式
+ (UIButton *)type:(int)type withFrame:(CGRect)frame withTitle:(NSString *)title withTarget:(id)target withAction:(SEL)action {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = frame;
    [button setTitle:title forState:UIControlStateNormal];
    [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    return button;
}

@end
